<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html  xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:p="http://primefaces.org/ui"
       xmlns:cc="http://java.sun.com/jsf/composite">
	      
	     <!--INFERFACE-->
	     <cc:interface>  
	         <cc:attribute name="textValue" />  
	         <cc:attribute name="textStyle" />       
	         <cc:attribute name="isOnlyRead" />  
	     </cc:interface>  
	     
	     <!--IMPLEMENTATION--> 
	     <cc:implementation>  
	     
               <p:calendar    rendered="#{!cc.attrs.isOnlyRead}"   
                              value="#{cc.attrs.textValue}"
                              locale="pt"
                              pattern="dd/MM/yyyy"
                              effect="fade"
                              onkeyup="mascaraData(this)"
                              size="10"
                              maxlength="10"
                              mode="popup"/> 
                              
               <h:outputText rendered="#{cc.attrs.isOnlyRead}" 
                             value="#{cc.attrs.textValue}"
                             styleClass="#{cc.attrs.textStyle}">
                            <f:convertDateTime patter="dd/MM/yyyy"/> 
               </h:outputText>           
	           
	     </cc:implementation>  
     
 </html>     
